package com.bw.im.msg

import com.bw.common.mvi.BaseRespository
import com.bw.network.BaseEntity
import com.bw.network.HttpType
import com.bw.network.NetWorkFactory
import kotlinx.coroutines.flow.Flow

class MsgRepo : BaseRespository() {

    //刷新消息列表
    fun refreshMsg(map : Map<String,Any>):Flow<BaseEntity>{
        return NetWorkFactory.factory(HttpType.NONE)
            .create(ApiService::class.java)
            .requestMsg(createBody(map))
    }
    //加载更多消息
    fun loadMsg(map : Map<String,Any>):Flow<BaseEntity>{
        return NetWorkFactory.factory(HttpType.NONE)
            .create(ApiService::class.java)
            .requestMsg(createBody(map))
    }
}